package com.action;

import com.dao.BookDAO;
import com.entity.Book;

public class CreatBookAction extends AbstractBookAction{
	
	public String execute () throws Exception{
		Book book = new Book();
		book.setBookTitle(bookTitle);
		book.setBookAuthor(bookAuthor);
		book.setBookPrice(Double.parseDouble(bookPrice));
		book.setCategoryId(Integer.valueOf(categoryId));
		book.setBookDesc(bookDesc);
		BookDAO dao = new BookDAO();
		dao.createBook(book);
		return SUCCESS;
	}
	
	
}
